const express = require('express');
const router = express.Router();

// 导入路由模块
const authRoutes = require('./auth');
const progressRoutes = require('./progress');
const checkinRoutes = require('./checkin');
const resourceRoutes = require('./resource');
const adminRoutes = require('./admin');

// 注册路由
router.use('/auth', authRoutes);
router.use('/progress', progressRoutes);
router.use('/checkin', checkinRoutes);
router.use('/resources', resourceRoutes);
router.use('/admin', adminRoutes);

// 健康检查接口
router.get('/health', (req, res) => {
  res.json({
    status: 'OK',
    message: '学习平台API服务正常运行',
    timestamp: new Date().toISOString()
  });
});

module.exports = router; 